package com.hannesdorfmann.mosby3.mvi.integrationtest.lifecycle.componetcotainer;


import com.hannesdorfmann.mosby3.mvi.integrationtest.lifecycle.LifecycleTestPresenter;
import com.hannesdorfmann.mosby3.mvi.integrationtest.lifecycle.LifecycleTestView;
import com.hannesdorfmann.mosby3.mvi.layout.MviStackLayout;
import ohos.agp.components.AttrSet;
import ohos.agp.components.Component;
import ohos.app.Context;


public class TestMviStackLayout extends MviStackLayout<LifecycleTestView, LifecycleTestPresenter> implements  LifecycleTestView{

  public final LifecycleTestPresenter presenter = new LifecycleTestPresenter();
  public int createPresenterInvocations = 0;

  public TestMviStackLayout(Context context, AttrSet attrs) {
    super(context, attrs);
  }

  @Override
  protected void onAttachedToWindowDo(Component component) {

  }

  @Override
  protected void onDetachedFromWindowDo(Component component) {

  }

  @Override public LifecycleTestPresenter createPresenter() {
    createPresenterInvocations++;
    return presenter;
  }
}
